<?php
/*
 * mk script file created on 5-mag-2005
 * jaco_at_pixeldump_dot_org
 * saving images contained in a frame
 */

include("sample_utils.php");                        // need to include this to use mk

$swfFN = "01b[1].swf";
$im = new MKSwfItemGrabber($swfFN, "", 1, IMAGE_ITEM);
$bmList = $im->get_itemList();

$str = "";

foreach($bmList as $bm){
	$imgFN = $bm->get_imageFileName();
	$bm->save_image();
	$sHtml = "<img src=\"" .$imgDir;
	$sHtml .= $imgFN ."\" width=\"";
	$sHtml .= $bm->get_imageWidth() ."\" height=\"";
	$sHtml .= $bm->get_imageHeight() ."\" />";

    $str .= trace_var($sHtml, "saved image: " .$imgFN, false, false, true);
}

$str .= trace_var(SERVER_MKTMP, "images saved, please look in", false, false, true);
echo show_content($str, basename(__FILE__));
?>
